payment stack は、最長どれくらいスタックしてしまう?
from LN technical details
payment stack は、最長どれくらいスタックしてしまう?
update_add_htlc が成功したら、送金を取りやめることはできない
bolts/02-peer-protocol.md at master · lightning/bolts
botl11 invoice には min_final_cltv_expiry_delta が指定される
これは、最後の HTLC が要求する delta の最小値
Default is 18 if not specified.
18*10/60=3h
max_htlc_cltv が定義されている
bolts/04-onion-routing.md at master · lightning/bolts
BOLT4: Specify max HTLC nLocktime for expiry_too_far by ariard · Pull Request #1086 · lightning/bolts
if the cltv_expiry is more than max_htlc_cltv in the future
の場合エラーになる
つまり、2016 block ~= 2 week が timeout の最大値
各実装の delta のデフォルト値
Replacement cycling attacks の影響で、delta を大きくした実装がある
LND
80
https://github.com/lightningnetwork/lnd/blob/35102e7c35c7923e27d937d10ba51757edd9ec6e/sample-lnd.conf#L707
CLN
18
https://github.com/ElementsProject/lightning/blob/03b4f4778e8c9119fed30b9ad098851dfd9145a2/lightningd/options.c#L1056
eclair
CLTV expiry delta | Bitcoin Optech